<template>
    <main-wrap>
        <div class="fbox">
            <van-form >
                <van-cell-group inset>
                    <van-field v-model="formData.title" name="title" label="标题" placeholder="请输入会议标题" show-word-limit maxlength="20"/>
                    <van-field v-model="formData.meeting_start" is-link readonly name="datePicker" label="开始时间" placeholder="点击选择时间" @click="showPicker = true"/>
                    <van-field name="stepper" label="持续时间">
                        <template #input>
                            <van-stepper v-model="formData.meeting_duration" />
                        </template>
                    </van-field>
                    <van-field v-model="formData.description" name="meeting" label="描述" placeholder="请输入会议描述" rows="10" type="textarea" show-word-limit maxlength="500"/>
                </van-cell-group>
            </van-form>
        </div>
        <template v-slot:footer>
            <a class="cjbtnbox">
                <van-button type="primary" round color="#e3af2f" block>提交数据</van-button>
            </a>
        </template>
    </main-wrap>
    <van-popup v-model:show="showPicker" position="bottom">
        <van-date-picker  @confirm="onConfirm" @cancel="showPicker = false" />
    </van-popup>
</template>
<script setup>
import { ref,onMounted,nextTick } from "vue";
import {useRouter} from 'vue-router'
import moment from 'moment'
import {get_meetings_list} from '@/api/qy-wechat-api'
import {toast,loading,clearToast} from '@/utils/vant'
import { useUserStore } from '@/stores/modules/user'
import mainWrap from '@/components/mainWrap.vue'
import footerNav from '@/components/footerNav.vue'
//import smSearch from "./components/smSearch.vue"
import mySearch from '@/components/mySearch.vue'
import {timestampFormat} from '@/utils/convert'

const router = useRouter()
const userStore = useUserStore()

const formData = ref({})
const showPicker = ref(false)

onMounted(async ()=>{
    
})

const onConfirm = ({ selectedValues }) => {
    formData.value.meeting_start= selectedValues.join('/');
      showPicker.value = false;
};



</script>

<style lang="scss" scoped>
.fbox{
   padding: 30px 0 0 0; 
}
.cjbtnbox{
    display: block;
    padding: 10px 20px;
    background-color: #fff;
    box-shadow: 0 0 5px #eee;
}

</style>